Skip to content

Give the cgp crate README a compiled quick look, and run doctests in CI - #297

Merged
soareschen merged 8 commits into
mainfrom
crate-readme-first-contact
Nov 15, 2026
Merged

soareschen merged 8 commits into
mainfrom
crate-readme-first-contact

Conversation

@soareschen

@soareschen soareschen commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

[claude-opus-5-5] The cgp crate README, which crates.io and docs.rs show, now gives a first-time reader a working example and routes them to the website. It opens with the tag line and the reassurance line, then covers:

  • What CGP adds: a plain description of the limit of ordinary traits that providers and contexts work around.
  • A quick look: a short greeting example, followed by when a plain trait is enough and what CGP costs.
  • Installation: the minimum Rust version, the no_std build, the alloc feature, and cargo-cgp.
  • Where to learn more: the website's Quickstart, Tutorials, Concepts, Reference, and costs section, each named by the question it answers.

The quick look runs as the crate's doctest, so the test job now runs cargo test --doc across the workspace. The rest of the suite runs under nextest, which skips doctests.

Other changes

These smaller documentation changes ride along:

  • Error backends: the READMEs of cgp-error-anyhow, cgp-error-eyre, and cgp-error-std link the website rather than the knowledge base.
  • cargo-cgp links: the root README links the cargo-cgp pages at their new /docs/tooling/cargo-cgp/ URLs.
  • Writing rule: AGENTS.md asks for natural writing in public-facing documents such as READMEs, beside point-first writing for internal prose.

Impact

The crate README no longer links the knowledge base. A reader working with a coding agent goes to the website's AI-assisted development section instead.

A crate that wires DebugError or DisplayError needs features = ["alloc"], since the default features turn on no allocator, and the install section now shows that line.

The website links in the READMEs, /docs/tooling/cargo-cgp/ included, resolve once the website's redesign is published with the release.

soareschen and others added 8 commits November 15, 2026 14:38
The README that crates.io and docs.rs show now gives the reassurance
line beside the tag line, a short greeting example that compiles as
the crate's doctest, and the costs it carries. Its links send a learner
to the website, an evaluator to the front page's costs and maturity
section, and an agent user to the site's AI-assisted development
section instead of the knowledge base's repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default features turn on no allocator, so a crate that wires
`DebugError` or `DisplayError` must add `features = ["alloc"]`. The
README's install section now says so beside the `no_std` build, and
its opening drops a sentence that repeated the reassurance line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each paragraph now follows from the one before: the opening says what
limit of ordinary traits CGP works around, the quick look introduces
its example before the code, the install section explains why
`cargo-cgp` helps, and the links name the question each page answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The universal writing rule now asks for natural writing in documents
people outside the project read, such as a repository or crate README,
beside point-first writing for internal prose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nextest runs no doctests, so the `cgp` crate README's quick look, which
the crate includes as its documentation, was checked only locally. The
test job now runs `cargo test --doc` across the workspace after the
suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each backend's link bar drops its link to the knowledge base's project
record, a document written for agents, and keeps the website's pages on
error handling and the error components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The website serves its cargo-cgp pages under `/docs/tooling/cargo-cgp/`,
in the Tooling section, so every link to them moves there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The opening, the quick look, the costs, the install notes, and the
links read more plainly, and the description splits into what CGP
does and what this crate gives. The settled tag line, the reassurance
line, and the canonical `cargo cgp check` sentence stay word for word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@soareschen
soareschen marked this pull request as ready for review November 15, 2026 14:02
@soareschen
soareschen merged commit 286c266 into main Nov 15, 2026
6 checks passed
@soareschen
soareschen deleted the crate-readme-first-contact branch November 15, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant